Generating Optimal Contiguous Evaluations for Expression DAGs
نویسندگان
چکیده
We consider the NP complete problem of generating contiguous evaluations for expression DAGs with a minimal number of registers We present two algorithms that generate optimal contiguous evaluation for a given DAG The rst is a modi cation of a complete search algorithm that omits the generation of redundant evaluations The second algorithm generates only the most promising evaluations by splitting the DAG into trees with import and export nodes and evaluating the trees with a modi ed labeling scheme Experiments with randomly generated DAGs and large DAGs from real application programs con rm that the new algorithms generate optimal contiguous evaluations quite fast
منابع مشابه
Optimal Continguous Expression DAG Evaluations
Generating evaluations for expression DAGs with a minimal number of registers is NP{complete. We present two algorithms that generate optimal contiguous evaluation for a given DAG. The rst is a modiication of a complete search algorithm that omits redundant evaluations. The second algorithm generates only the most promising evaluations by splitting the DAG into trees with import and export node...
متن کاملEfficient Register Allocation for Large Basic Blocks
We consider the NP{complete problem of generating evaluations for expression DAGs with a minimalnumber of registers. We restrict our attention to contiguous evaluations, because for nearly all of the DAGs derived from real application programs there exists a contiguous evaluation that is optimal w.r. to the register need. We present an algorithm that generates an optimal contiguous evaluation f...
متن کاملA Randomized Heuristic Approach to Register Allocation
We present a randomized algorithm to generate contiguous evaluations for expression DAGs representing basic blocks of straight line code with nearly minimal register need. This heuristic may be used to reorder the statements in a basic block before applying a global register allocation scheme like Graph Coloring. Experiments have shown that the new heuristic produces results which are about 30%...
متن کاملScheduling Expression DAGs for Minimal Register Need
Generating schedules for expression DAGs that use a minimal number of registers is a classical NP{complete optimization problem. Up to now an exact solution could only be computed for small DAGs (with up to 20 nodes), using a trivial O(n!) enumeration algorithm. We present a new algorithm with worst{case complexity O(n2 2n) and very good average behaviour. Applying a dynamic programming scheme ...
متن کاملSingle Phase Construction of Optimal DAG-structured QEPs
Traditionally, database management systems use tree-structured query evaluation plans. They are easy to implement but not expressive enough for some optimizations like eliminating common algebraic subexpressions or magic sets. These require directed acyclic graphs (DAGs), i.e. shared subplans. Existing approaches consider DAGs merely for special cases and not in full generality. We introduce a ...
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
- Comput. Lang.
دوره 21 شماره
صفحات -
تاریخ انتشار 1995